package org.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.model.entity.User;
@Mapper
public interface  UserMapper extends BaseMapper<User> {

    @Select("SELECT EXISTS(SELECT 1 FROM users WHERE username = #{username}) ")
    boolean existsByUsername(String username);
    @Select("SELECT EXISTS(SELECT 1 FROM users WHERE phone = #{phone}) ")
    boolean existsByPhone(String phone);
    @Select("SELECT EXISTS(SELECT 1 FROM users WHERE email = #{email}) ")
    Boolean existsByEmail(String email);
}
